<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <div id="app">
        <div v-html="str"></div>
        <div>{{ message }}</div>
        <div>
            <p>姓名：{{friend.name}}</p>
            <p>年龄：{{friend.age}}</p>
            <p>性别：{{friend.sex===1?'男':'女'}}</p>
        </div>
        <script>
            const { createApp } = Vue
            createApp({
                data() {
                    return {
                        str: `<h1>你好</h1>`,
                        message: 'Hello Vue!',
                        friend: {
                            name: '张三',
                            age: 18,
                            sex: 1,
                        }
                    }
                }
            }).mount('#app')
        </script>
</body>

</html>